﻿using FreeSql.DataAnnotations;
using GalaSoft.MvvmLight;
using Newtonsoft.Json;
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace sys_Print.DataAsset
{
    [AddINotifyPropertyChangedInterface]
    [JsonObject(MemberSerialization.OptIn), Table(Name = "Meter")]
    public class Meter : ObservableObject
    {
        [JsonProperty, Column(Name = "[TaskNumber]", DbType = "varchar(255)")]
        public string TaskNumber { get; set; }

        [JsonProperty, Column(Name = "[FactoryNo]", DbType = "varchar(255)")]
        public string FactoryNo { get; set; }

        [JsonProperty, Column(Name = "[FactoryBarcode]", DbType = "varchar(255)")]
        public string FactoryBarcode { get; set; }

        [JsonProperty, Column(Name = "[CalibrationTime]", DbType = "varchar(255)")]
        public string CalibrationTime { get; set; }

        [JsonProperty, Column(Name = "[ENNTraceCode]", DbType = "varchar(255)")]
        public string ENNTraceCode { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "[MeterK]", DbType = "varchar(255)")]
        public string MeterK { get; set; } = string.Empty;

        [JsonProperty, Column(Name = "[FlowRange]", DbType = "varchar(255)")]
        public string FlowRange { get; set; } = string.Empty;

        [Column(IsIgnore = true)]
        public bool IsSelected { get; set; }

        [JsonProperty, Column(Name = "[HiPot]", DbType = "varchar(255)")]
        public string HiPot { get; set; } = string.Empty;

    }
}
